package com.teach.controller.certificate;



import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.teach.commons.Id;



@Controller
@RequestMapping("/certificate")
public class CertificateZhiFuController {
	
	@Autowired
	private Id idea;
	

	@PostMapping("certificate-zhifubao.do") 
	public String doAlipy(Model model, HttpServletRequest req) {
		long id=idea.nextId();
		model.addAttribute("q", id+"");
		model.addAttribute("q2", req.getParameter("q2"));
		model.addAttribute("q3", req.getParameter("q3"));
		model.addAttribute("q4", req.getParameter("q4"));
		return "forward:certificate.alipay.trade.page.pay.html";
	}
	
	
}
